package test3.test3_35;

/**
 * Color
 */
public class Color {
  private int rgb;

  public Color(int red, int green, int blue) {
    this.rgb = 0xff000000;
    // System.out.printf("%X\n", red << 4);
    // System.out.printf("%X\n", red << 8);
    // System.out.printf("%X\n", red << 12);
    // System.out.printf("%X\n", red << 16);
    this.rgb = this.rgb | (red << 16);
    this.rgb = this.rgb | (green << 8);
    this.rgb = this.rgb | (blue << 0);
  }

  public void print() {
    System.out.printf("%X", this.rgb);
  }

  public static void main(String[] args) {
    Color color = new Color(0, 255, 0);
    color.print();
  }
}